<template>
  <div style="height:100%;">
    <el-table :data="recordData" style="width: 100%;height:100%;" class="tableCon"  size="mini" highlight-current-row
      @current-change="taskTableRowSelect" key="recordData">
      <el-table-column label="序号" width="65px">
        <template slot-scope="scope">
          {{scope.$index+1}}
        </template>
      </el-table-column>
      <el-table-column prop="work" label="流程" min-width="90px">
      </el-table-column>
      <el-table-column label="操作时间" prop="createTime" min-width="140px">
        <template slot-scope="scope">
          {{scope.row.createTime.split('.')[0]}}
        </template>
      </el-table-column>
      <el-table-column label="操作人" prop="createByName" min-width="90px">
      </el-table-column>
       <el-table-column label="意见" prop="opinion" >
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        recordData: [],
      }
    },
    props: ['getPlanData','title'],
    mounted() {
      console.log(this.getPlanData)
      this.getWorkRecord();
    },
    computed: {

    },
    methods: {

      taskTableRowSelect(row) {
        // console.log(row)
      },
      getWorkRecord() {
        var data = {
          id: this.getPlanData.id
        }
        this.$http({
          method: 'post',
          apiUrl: '/detection/getWorkRecord.htm',
          params: data,
          isJson: false,
        }).then(res => {
          if (res.code === 0) {
            this.recordData = res.data
            console.log(res.data)
          }
        })
      }

    }
  }

</script>

<style>

</style>